// Kony

#pragma once

#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "BasePointCollection.generated.h"


/*
 * 点集合 演员类，用于创建一些生成点 用于群体法术在对应点生成粒子效果
 */
UCLASS()
class GASC_HUANLING_API ABasePointCollection : public AActor
{
	GENERATED_BODY()
	
public:	
	ABasePointCollection();
	virtual void Tick(float DeltaTime) override;

	// 获取地面点集合的函数，根据指定位置、点数量和偏航角返回场景组件数组
	// @param GroundLocation 地面位置，用于确定点集合的中心位置
	// @param NumPoints 需要获取距离中心最近的点数量
	// @param YawOverride 偏航角覆盖值，用于调整点的朝向，默认为0.f
	UFUNCTION(BlueprintPure)
	TArray<USceneComponent*> GetGroundPoints(const FVector& GroundLocation, int32 NumPoints, float YawOverride = 0.f);
protected:
	virtual void BeginPlay() override;
	//点集合场景组件 不可变数组
	UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category="Points")
	TArray<USceneComponent*> ImmutablePts;
	/* 点集合 场景组件 ，这里是预创建一些点组件 需要12个*/
	UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category="Points")
	TObjectPtr<USceneComponent> Pt_0;

	UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category="Points")
	TObjectPtr<USceneComponent> Pt_1;

	UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category="Points")
	TObjectPtr<USceneComponent> Pt_2;

	UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category="Points")
	TObjectPtr<USceneComponent> Pt_3;

	UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category="Points")
	TObjectPtr<USceneComponent> Pt_4;

	UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category="Points")
	TObjectPtr<USceneComponent> Pt_5;

	UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category="Points")
	TObjectPtr<USceneComponent> Pt_6;

	UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category="Points")
	TObjectPtr<USceneComponent> Pt_7;

	UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category="Points")
	TObjectPtr<USceneComponent> Pt_8;

	UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category="Points")
	TObjectPtr<USceneComponent> Pt_9;

	UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category="Points")
	TObjectPtr<USceneComponent> Pt_10;

	

};
